/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     chtMultiRegionFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         2000;

deltaT          1;

writeControl    timeStep;

writeInterval   10;   // Data is written at every 100 second

purgeWrite      0;

writeFormat     ascii;

writePrecision  7;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;

// Added later for postprocessing

functions
{
    wallHeatFlux1
	{
	type 		wallHeatFlux;
	libs		("libfieldFunctionObjects.so");
	executeControl	writeTime;
	writeControl	writeTime;
        patches		("topAir_to_wall;");
	region		topAir;//wall;
		
	}
    heatTrfCoeff1
	{
	type		wallHeatTransferCoeff;
	libs            ("libfieldFunctionObjects.so");
         rho            7301;
         Cp            226.5;
        // mu             1.8e-05;  // Dynamic Viscosity
         Prl             0.7;
         Prt             0.3;
        executeControl  writeTime;
        writeControl    writeTime;
	 htcModel	localReferenceTemperature;
	//htcModel	local;//fixedReferenceTemperature;
	patches		("topAir_to_wall");
	TRef		300;
	field		T;
	//region		wall;	
	}
      yPlustopAir
  {
    type            yPlus;
    libs            ("libfieldFunctionObjects.so");

    executeControl  writeTime;
    writeControl    writeTime;

    region  topAir;
  }

     areaAverage1
	{
        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        executeControl  writeTime;
        writeControl    writeTime;
	fields
	(
	T
	wallHeatTransferCoeff(T)	
        wallHeatFlux(T)	
	);
	writeFields	yes;
	regionType	patch;
	name		topAir_to_wall;
	region		topAir;
	operation	areaAverage;
	surfaceFormat   none;	
	}
}


// ************************************************************************* //
